#include "StdAfx.h"
#include "UIController.h"
#include "DxBoardDisplay.h"
#include "GuiController.h"

namespace catan
{
	UIController::UIController(void)
	{
		mPlayerItemBuildController = 0;
		mIGuiController = 0;
	}
	
	UIController::~UIController(void)
	{
		SafeDelete(mPlayerItemBuildController);
	}

	void UIController::Init()
	{
		mIGuiController = IGuiController::Create();
		mIGuiController->SetHelper(mHelper);
	}

	void UIController::OnCEvent( SetGameStart& set )
	{
		mHelper->GetDxBoardDisplay()->Display(set.mBoard);
	}

	void UIController::Display( const Handle<Board> board )
	{
		mIGuiController->Display();
	}
}